Skip to content

Add URL-based content lookup with incremental metadata updates#722

Merged
thmarx merged 5 commits into
CondationCMS:mainfrom
thmarx:url_lookup
Jul 23, 2026
Merged

Add URL-based content lookup with incremental metadata updates#722
thmarx merged 5 commits into
CondationCMS:mainfrom
thmarx:url_lookup

Conversation

@thmarx

@thmarx thmarx commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator
  • Introduces a dedicated url field on ContentNode and a persistent UrlIndex, so pages can be looked up by their public URL instead of resolving the file path first (ContentResolver, ViewResolver, NavigationFunction now use
    Content#byUrl). Content#byUri is deprecated in favor of byPath/byUrl.
  • Adds a persistent SectionIndex so listSectionEntries no longer scans the whole metadata tree, and section lookups now work correctly even when a page has a custom url.
  • Makes metadata updates incremental: file system events are now debounced and batched through a new ContentChangeCoordinator, and single file/directory changes update only the affected metadata instead of triggering a full resync. Directory
    renames are handled as a delete+create of the affected subtree. A watcher OVERFLOW event now triggers a full resync instead of being silently dropped.
  • Removes the in-memory metadata backend (MemoryMetaData/MemoryQuery) and the queryIndexMode switch; PersistentMetaData is now the only backend.
  • Makes YAML header writes and the CLI pid file write atomic (write-to-temp + move), and the pid file now also stores the process start time so a reused PID isn't mistaken for a still-running CMS process.
  • Bumps CI to JDK 25 (release) instead of 25-ea.

Fix included in this PR

  • Fixed a bug in ContentResolver#getContent where a content node with its own redirect.location/redirect.status set was returned as a normal (empty) DefaultContentResponse instead of a RedirectContentResponse, because an earlier
    isRedirect() check already returned before the actual redirect-response branch was ever reached. The redirect and alias-redirect handling has been merged into a single if/else if chain so the correct branch is no longer unreachable.
  • Removed now-dead code: the unreachable comment block in ContentResolver, and the unused getUrl(ReadOnlyFile) helper (and its now-unused imports) in AbstractCurrentNodeFunction, which was made obsolete by the switch to
    ContentNode#url().

@thmarx thmarx added this to the 8.3.0 milestone Jul 18, 2026
@thmarx thmarx changed the title Url lookup Add URL-based content lookup with incremental metadata updates Jul 22, 2026
@thmarx
thmarx merged commit 8083aa0 into CondationCMS:main Jul 23, 2026
1 check passed
@thmarx
thmarx deleted the url_lookup branch July 23, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant